package com.lykj.common.utils;

import java.io.Serializable;
import java.util.HashMap;

/**
 * Description: 封装httpClient响应结果
 *
 * @author cxl
 * @date Created on 2018年4月19日
 */
public class HttpClientResult implements Serializable {

	private static final long serialVersionUID = 2168152194164783950L;

	/**
	 * 响应状态码
	 */
	private int code;

	/**
	 * 响应数据
	 */
	private String content;

	private HashMap<String,String> cookies;

	public HttpClientResult() {
	}

	public HttpClientResult(int code) {
		this.code = code;
	}

	public HttpClientResult(String content) {
		this.content = content;
	}


	public HttpClientResult(int code, String content) {
		this.code = code;
		this.content = content;
		this.cookies = cookies;
	}

	public HttpClientResult(int code, String content, HashMap<String,String> cookies) {
		this.code = code;
		this.content = content;
		this.cookies = cookies;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public void setCookies(HashMap<String, String> cookies) {
		this.cookies = cookies;
	}

	public HashMap<String, String> getCookies() {
		return cookies;
	}

	@Override
	public String toString() {
		return "HttpClientResult [code=" + code + ", content=" + content + "]";
	}

}
